package com.esri.core.internal.tasks.e.a;

import com.esri.core.geometry.Envelope;
import com.esri.core.geometry.GeometryEngine;
import com.esri.core.geometry.SpatialReference;
import java.util.ArrayList;
import java.util.List;

/* loaded from: classes.dex */
public class f {
    public static final String a = "1.0.0";
    public static final String b = "1.1.0";
    public static final String c = "1.1.1";
    public static final String d = "1.3.0";
    private g g;
    private String i;
    private String j;
    private String k;
    private String m;
    private String n;
    private List<h> e = new ArrayList();
    private List<h> f = null;
    private ArrayList<String> h = new ArrayList<>();
    private List<String> l = null;

    public String a() {
        return this.n;
    }

    public g b() {
        return this.g;
    }

    public Envelope c() {
        g gVar = this.g;
        if (gVar != null) {
            if (g.a(this.m, gVar.b())) {
                return g.b(this.g.a());
            }
            return this.g.a();
        }
        return null;
    }

    public List<String> d() {
        if (this.l == null) {
            this.l = new ArrayList();
            for (h hVar : this.e) {
                this.l.addAll(hVar.a());
            }
        }
        return this.l;
    }

    public void a(List<String> list) {
        this.l = list;
    }

    public SpatialReference e() {
        String b2;
        int b3;
        g gVar = this.g;
        if (gVar == null || (b2 = gVar.b()) == null || (b3 = g.b(b2)) == -1) {
            return null;
        }
        return SpatialReference.create(b3);
    }

    public void a(g gVar) {
        this.g = gVar;
    }

    public void a(String str) {
        this.n = str;
    }

    public String f() {
        return this.m;
    }

    public void b(String str) {
        this.m = str;
    }

    public String g() {
        return this.k;
    }

    public void c(String str) {
        this.k = str;
    }

    public String h() {
        return this.i;
    }

    public void d(String str) {
        this.i = str;
    }

    public String i() {
        return this.j;
    }

    public void e(String str) {
        this.j = str;
    }

    public List<h> j() {
        return this.e;
    }

    public List<h> k() {
        return this.f;
    }

    public void b(List<h> list) {
        this.f = list;
    }

    public Envelope a(h hVar, String str, SpatialReference spatialReference, String str2) {
        if (str != null && hVar != null) {
            if (hVar.g() != null && hVar.g().size() > 0) {
                for (g gVar : hVar.g()) {
                    if (str.equals(gVar.b())) {
                        if (g.a(str2, str)) {
                            return g.b(gVar.a());
                        }
                        return gVar.a();
                    }
                }
            }
            if (hVar.i() != null) {
                return (Envelope) GeometryEngine.project(hVar.i().a(), SpatialReference.create(4326), spatialReference);
            }
            if (hVar.h() != null) {
                return (Envelope) GeometryEngine.project(hVar.h().a(), SpatialReference.create(4326), spatialReference);
            }
            if (hVar.j() != null && hVar.j().size() > 0) {
                for (h hVar2 : hVar.j()) {
                    Envelope a2 = a(hVar2, str, spatialReference, str2);
                    if (a2 != null) {
                        return a2;
                    }
                }
            }
        }
        return null;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void a(h hVar) {
        this.e.add(hVar);
    }

    public List<String> l() {
        return this.h;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void f(String str) {
        this.h.add(str);
    }
}
